﻿using Core.Tools.Extension;
using Hardware.Reactor.Base;
using Prism.Ioc;
using Prism.Modularity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using UI.Application.Share.Names;

namespace Hardware.Reactor.Default
{

    // 硬件： 运动控制器  1号反应釜温度检测 2号反应釜温度检测 加热制冷器  天平  485直流电源  加料泵 


    /// <summary>
    /// 反应釜硬件模块
    /// </summary>
    [Module(ModuleName = ModuleNames.HardwareReactorModule, OnDemand = true)]
    public class HardwareReactorModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            containerProvider.InitializeAssembly(Assembly.GetExecutingAssembly()); 
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterAssembly(Assembly.GetExecutingAssembly());

            containerRegistry.RegisterSingleton<ITemp1Reader, Temp1Reader>();//注册1号反应釜温度检测
            containerRegistry.RegisterSingleton<ITemp2Reader, Temp2Reader>();//注册2号反应釜温度检测
            containerRegistry.RegisterSingleton<ITempController, TempController>();//注册温度控制模块（加热制冷，采集浊度）
        }
    }
}
